import 'dart:convert';

import 'package:lib_core/gt_message_center.dart';


enum UIkitFlutterToNativeEvent{
  scrollToTop,  //flutter的列表滚动事件给原生
  requireScroll, //flutter控制事件是否给原生
}

mixin GTNativeViewPagerScrollFix {

  void handleTapDown() {
    var params = {
      'touchEvent': 'down'
    };
    GTMessageCenter.sendMessageJson(UIkitFlutterToNativeEvent.requireScroll, jsonEncode(params));
  }

  void handleTabUp() {
    var params = {
      'touchEvent': 'up'
    };
    GTMessageCenter.sendMessageJson(UIkitFlutterToNativeEvent.requireScroll, jsonEncode(params));
  }
}